<%@ page import="com.imu.wys.model.User" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/3/17
  Time: 9:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    String username=((User)session.getAttribute("user")).getUsername();
%>
<span style="font-size: 30px"><%=username%> &nbsp;欢迎您的登录 <a href="drop.UserAction">退出登录</a></br></span>

<table border="1px">
    <tr>
        <td>当前在线用户</td>
    </tr>
<%
    ServletContext context = session.getServletContext();
    List<String> userList = (List<String>)context.getAttribute("onlineUserList");

    for(String str:userList){
%>
        <tr>
            <td><span><%=str%></span></td>
        </tr>
<%
    }
%>
</table>
</body>
</html>
